package zsc.ruanc.practicaltraining.model.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 邮箱表
 */
@Data
public class TMailbox {

  @NotNull(message = "userId不能为空")
  @Min(message = "userId不能为小于0", value = 0)
  @ApiModelProperty(value = "用户id，外键", required = true, dataType = "int")
  private Integer userId;

  @NotBlank(message = "info不能为空")
  @ApiModelProperty(value = "邮箱内容", required = true, dataType = "string")
  private String info;

  @NotNull(message = "id不能为空")
  @Min(message = "id不能为小于0", value = 0)
  @ApiModelProperty(value = "邮箱id，主键", required = true, dataType = "int")
  private Integer id;

  @ApiModelProperty(value = "创建时间", required = false, dataType = "Date")
  private Date created;

  @ApiModelProperty(value = "用户是否已读", required = false, dataType = "boolean")
  private Boolean flag;

  @ApiModelProperty(value = "信息类型", required = false, dataType = "boolean")
  private String title;



}
